# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-other
pkgname=plasma-pass
pkgver=1.2.2
pkgrel=2
pkgdesc="Plasma applet for the Pass password manager"
# armhf blocked by qt5-qtdeclarative
arch="all !armhf"
url="https://kde.org/plasma-desktop/"
license="LGPL-2.1-or-later"
makedepends="
	extra-cmake-modules
	gpgme-dev
	ki18n-dev
	kio-dev
	kitemmodels-dev
	libplasma-dev
	oath-toolkit-dev
	plasma5support-dev
	qt6-qtbase-dev
	qt6-qtdeclarative-dev
	samurai
	"
subpackages="$pkgname-lang"
_repo_url="https://invent.kde.org/plasma/plasma-pass.git"
source="https://download.kde.org/stable/plasma-pass/plasma-pass-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DBUILD_WITH_QT6=ON \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
40a6ee175ff1801cee84947639414f3e01c1fc28ad08ef54bbf1b131ecb8239236274ef10ae6c0aab600ccdc25c17bca24a245e78506331d416ee6d9b5e874be  plasma-pass-1.2.2.tar.xz
"
